package com.authine.cloudpivot.ext.enums.order.transfer;



/**
 * @author xue
 * 2020/4/17
 */
public enum InvoiceStatus {

    /**
     * 发票状态（0新建,1审核中、2已退回、3待开票、5已开票、6已取消）
     */
    New(1,"新建"),
    Approving(2,"审核中"),
    DrawerConfirming(3,"待开票"),
    Done(4,"已开票"),
    Cancel(5,"已取消");

    public Integer id;
    public String des;


    InvoiceStatus(Integer id,String des) {
        this.id = id;
        this.des = des;
    }

    public static InvoiceStatus get(Integer code) {
        for (InvoiceStatus c : InvoiceStatus.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }
}
